#coding=utf8
'''
Created on 2010-10-14

@author: Chine
'''
from django import forms
from django.forms import ModelForm

from ChineKingBlog.blog.models import Comment, Message, Article

class MessageForm(ModelForm):
    avatar = forms.URLField(widget=forms.HiddenInput, required=False)
    class Meta:
        model = Message

class CommentForm(ModelForm):
    article = forms.ModelChoiceField(Article.objects.all(), widget=forms.HiddenInput())
    reply_to_comment = forms.ModelChoiceField(Comment.objects.all(), widget=forms.HiddenInput(), required=False)
    avatar = forms.URLField(widget=forms.HiddenInput, required=False)
    class Meta:
        model = Comment
        